/*
 * @lc app=leetcode.cn id=789 lang=cpp
 *
 * [789] 逃脱阻碍者
 */

// @lc code=start
class Solution
{
public:
  bool escapeGhosts(vector<vector<int>>& ghosts, vector<int>& target)
  {
    int x = target[0], y = target[1];
    int len = abs(x) + abs(y);
    for (auto& ghost : ghosts) {
      if (abs(x - ghost[0]) + abs(y - ghost[1]) <= len)
        return false;
    }
    return true;
  }
};
// @lc code=end
